#!/usr/bin/env python3
import json
import os
print("欢迎使用")
content=[]
paths=[]
with open("./config.json","r",encoding="utf-8") as f:
    config=f.read()
    content=json.loads(config)
while True:
    for i in range(len(content["programs"])):
        print(str(i+1)+"."+content["programs"][i]["name"])
        paths.append(content["programs"][i]["path"])
    choice = int(input("请输入要运行的程序编号"))
    os.system(paths[choice-1])
